(1) Field of the Invention
The present invention relates to an image processing apparatus, and particularly to a technique for decreasing deterioration of image quality in an image forming apparatus that forms an image based on digital image data.
(2) Description of Related Art
In image forming apparatuses that form an image based on digital image data, various image processing such as smoothing and edge enhancement is generally employed to improve image quality. Such image processing is performed on pixels of image data in accordance with an image type, examples of which include a character image and a halftone-dot image. To be more specific, a pixel that is judged to be in a halftone-dot area is typically subjected to smoothing, and a pixel that is judged to be in an edge area of a character is typically subjected to edge enhancement.
Here, the following describes an example of a method for judging whether each of pixels included in image data is in an edge area of a character or not. Each pixel is set as a target pixel to be judged, and the first judgment is performed as to whether the target pixel is an inner edge pixel or not, using a linear differential filter or a quadratic differential filter with a predetermined size, for example, of 5*5 pixels. An “inner edge pixel” is an edge pixel with lower brightness at the transition from an area with low brightness to an area with high brightness. Then, the second judgment is performed as to whether the target pixel is in an edge area of a character or not, by counting the number of inner edge pixels present in a predetermined area. According to this method, brightness data of each pixel is first made to pass through the filter including the target pixel as the center. The first judgment as to whether the target pixel is an inner edge pixel is performed, by judging whether the relationship between brightness of the target pixel and brightness of nearby pixels satisfies a predetermined condition.
Following this, the second judgment as to whether the target pixel is in an edge area of a character is performed, by counting the number of inner edge pixels present in a predetermined area such as an area consisting of 9*9 pixels, and comparing the count number with a predetermined threshold. To be more specific, when the count number is above the predetermined threshold, the target pixel is judged to be in an edge area of a character.
However, the above conventional image processing apparatuses have the problem that a judgment as to whether a pixel is in an edge area of a character, or a pixel is included in a halftone-dot that constitutes a halftone-dot area, may not be performed correctly, particularly when, for example, a character is present on a halftone-dot area.
The following describes this problem, with reference to FIG. 1. In the figure, the horizontal axis indicates resolution and density of a halftone-dot area, and a size of a character, and the vertical axis indicates the number of inner edge pixels to be counted in the above predetermined area.
Here, the following briefly describes the meaning of the terms “resolution” and “density” of a halftone-dot image. For a halftone-dot image, resolution can be defined by the number of halftone-dots present in a predetermined area. Density (gradation) of the halftone-dot area depends on a total area occupied by a plurality of halftone-dots included therein. In general, when two halftone-dot images with different resolution have the same density, the halftone-dot image with lower-resolution (where a distance between the center of one halftone-dot to the center of an adjacent halftone-dot is larger) includes halftone-dots of a larger size, and the halftone-dot image with higher-resolution (where a distance between the center of one halftone-dot to the center of an adjacent halftone-dot is smaller) includes halftone-dots of a smaller size.
For a halftone-dot image, density can be defined by resolution (a distance from the center of one halftone-dot to the center of an adjacent halftone-dot) and a size of each halftone-dot. In general, when two halftone-dot images with different density have the same resolution, the halftone-dot image with higher-density includes halftone-dots of a larger size, and the halftone-dot image with lower density includes halftone-dots of a smaller size.
A curve 901 indicates the relationship between (a) resolution and density of a halftone-dot area and (b) the number of inner edge pixels to be detected, in the case of a halftone-dot image. A curve 902 indicates the relationship between (a) a size of a character and (b) the number of inner edge pixels to be detected, in the case of a character image.
As the figure shows, a greater number of pixels present at a periphery of a halftone-dot are judged to be inner edge pixels, as a halftone-dot area has lower-resolution or higher-density, in other words, as a size of a halftone-dot that constitutes the halftone-dot area increases. Accordingly, if a threshold for a judgment of an edge area of a character is set at a value “A” in the figure, pixels in a halftone-dot area with low-resolution or high-density may be misjudged to be pixels in an edge area of a character.
If such a misjudgment occurs, edge enhancement is performed on pixels of a halftone-dot that constitutes a halftone-dot area, causing image quality to deteriorate drastically. On the other hand, if the threshold is set at a value “B” in view of preventing such a misjudgment of pixels in a halftone-dot area with low-resolution or high-density as pixels in a character image, pixels in a character image may contrarily be misjudged to be pixels in a halftone-dot area due to fluctuated scanner characteristics and the like. If such a misjudgment occurs, smoothing is performed on pixels in an edge area of a character, also causing image quality to deteriorate.